package com.cy.src.upload;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by CY on 2016/10/27.
 */

public interface UploadService {
    @Multipart
    @POST("/Api/File/UploadFile")
    Observable<ResponseBody> upload(@Query("nid") String nid, @Query("fileName") String fileName, @Part MultipartBody.Part file);

    @GET("/Api/File/DownloadFile")
    Observable<ResponseBody> download(@Query("nid") String nid, @Query("fileName") String fileName);
}
